<extend name="./Apps/Home/View/default/shops/layout.html" />
<block name="content">
<style>
.webuploader-pick{padding:0px 10px;background:#e23e3d;}
</style>
<script>
   var uploading = null;
   $(function(){
	   var uploader = uploadFile({
    	  server:"{:U('Home/Goods/importGoods')}",pick:'#filePicker',
    	  formData: {dir:'temp'},
    	  callback:function(f,file){
    		  layer.close(uploading);
    		  var json = WST.toJson(f);
    		  if(json.status==1){
    			  uploader.removeFile(file);
    			  uploader.refresh();
    		      WST.msg('导入数据成功!已导入数据'+json.importNum+"条", {icon: 1});
    		  }else{
    			  WST.msg('导入数据失败,出错原因：'+json.msg, {icon: 5});
    		  }
	      },
	      progress:function(rate){
	    	  uploading = WST.msg('正在导入数据，请稍后...');
	      }
      });
   });
</script>
   <div class="wst-body"> 
       <div class='wst-page-header'>卖家中心 > 数据导入</div>
       <div class='wst-page-content'>
        <table class="table table-hover table-striped table-bordered wst-form">
           <tr>
             <td colspan='2' style='color:#707070;padding-left:25px;padding-top:5px;'>
             • 请勿重复上传, 否则将造成重复商品数据<br/>
             • 请保证导入的数据在Excel的第一个工作表(Sheet)<br/>
             • 若Excel上某一行第一列为空则代表商品数据导入完毕<br/>
             • 若没有数据模板，请点击<a href='__PUBLIC__/template/goods.xls' style='color:blue;' target='_blank'>下载Excel模板</a></a><br/>
             • 推荐使用谷歌浏览器或者火狐浏览器Firefox以获得更佳体验
             </td>
           </tr>
           <tr>
             <th align='right' width='90'>商品数据：</th>
             <td>
	             <div id="filePicker" style='margin-left:0px;'>导入商品数据</div>		 
             </td>
           </tr>
        </table>
       </div>
   </div>
</block>  